<template>
    <Select :value="value" placeholder="选择设备" filterable style="display:inline-block;">
        <Option v-if="showAll" value="">全部</Option>
        <Option v-for="(value, key) in clientsBriefData" :key="key" :value="key" :label="value || key">
            <div v-if="value">
                <div>{{ value }}<span style="font-size: 10px;color:#aaa;margin-left: 5px;">{{ key }}</span></div>
            </div>
            <div v-else>{{ key }}</div>
        </Option>
    </Select>
</template>

<script>
import { mapGetters } from 'vuex';

export default {
    name: 'ClientSelect',
    props: {
        value: String,
        showAll: {
            type: Boolean,
            default: true
        }
    },
    computed: {
        ...mapGetters(['clientsBriefData', 'getClientBriefValue']),
    },
    methods: {
    }
}
</script>